package com.hz.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.alibaba.fastjson.JSONObject;
import com.hz.web.util.ConstantUtils;
import com.hz.web.util.HttpUtils;

@Controller
@RequestMapping("httpsUtil")
public class HttpsController {

	@RequestMapping("queryWfxy")
	@ResponseBody
	public JSONObject queryWfxy(String url,String xm, String sfzhm, String zzjgdm,
			String gszch, String yt, String frdbxm, String jqcz, String qymc,
			String tyshxydm) {
		String utilIp =ConstantUtils.getInterfaceUrl("urlStr");
		String resultJsonStr = "";
		url = url+"&qymc="+qymc+"&zzjgdm="+zzjgdm+"&gszch="+gszch;
		String allUrl = utilIp+url;
		try {
			resultJsonStr = HttpUtils.httpClient(new JSONObject(), allUrl);
		} catch (Exception e) {
			e.printStackTrace();
		}
		JSONObject json = JSONObject.parseObject(resultJsonStr);
		json.put("utilip", utilIp);
		return json;
	}
	
}
